<script setup lang="ts">
import {ref} from 'vue';
import {useStore} from 'vuex';
const title = ref('Home页面');

const store = useStore();

const increase = () => {
    store.dispatch('increment')
}
const decrease = () => {
    store.commit('decrement');
}
</script>
<template>
  <h1>{{ title }}</h1>
  <div>
    <button @click="increase">
      增加
    </button>
    <span>{{ store.state.count }}</span>
    <button @click="decrease">
      减少
    </button>
  </div>
</template>
